home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 429_01 / chess12 / cplayer.hpp < prev    next >
C/C++ Source or Header  |  1994-03-30  |  464b  |  23 lines

  1. #if !defined(CPLAYER_HPP)
  2. #define CPLAYER_HPP
  3.  
  4. #include "chess.hpp"
  5. #include "player.hpp"
  6.  
  7. // player whose moves are chosen by the computer
  8. class COMPUTERPLAYER : public PLAYER
  9.   {
  10.   private:
  11.     // number of moves to look ahead when chosing the next move
  12.     const int lookAhead;
  13.  
  14.   public:
  15.     COMPUTERPLAYER(PIECECOLOR color, int lA) :
  16.       PLAYER(color), lookAhead(lA) { }
  17.  
  18.     virtual GAMESTATUS play(BOARD &board) const;
  19.  
  20.   };
  21.  
  22. #endif
  23.